<script setup lang="ts">
import { ref, computed } from 'vue';
import ButtonCounter from './components/ButtonCounter.vue'
import BlogPost from './components/BlogPost.vue'

</script>

<template>
  <div class="app-container">
    <ButtonCounter></ButtonCounter>
    <br/>
    <BlogPost title="标题1" content="这是内容1"></BlogPost>
    <br/>
    <BlogPost title="标题2" content="这是内容2"></BlogPost>
  </div>
</template>

<style>
/* 基础样式 */
.app-container {
  min-height: 100vh;
  padding: 20px;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
}

.theme-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.theme-selector select {
  padding: 8px 15px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  font-size: 16px;
}

.news-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 视频容器样式 */
.video-container {
  margin: 20px 0;
  border-radius: 8px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background-color: #000;
}

.news-content p {
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: justify;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* 日间主题样式 */
.day {
  background-color: #f5f5f5;
  color: #333;
}

.day .news-container {
  background-color: white;
  color: #333;
}

.day .theme-selector select {
  border-color: #ddd;
}

/* 夜间主题样式 */
.night {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

.night .news-container {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

.night .theme-selector select {
  background-color: #3d3d3d;
  color: #e0e0e0;
  border-color: #555;
}

.night h1 {
  color: #ffffff;
}

/* 多彩主题样式 */
.colorful {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.colorful .news-container {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.colorful .theme-selector select {
  background-color: rgba(255, 255, 255, 0.8);
  color: #764ba2;
  border-color: #ffffff;
  font-weight: bold;
}

.colorful h1 {
  color: #764ba2;
}

.colorful .video-wrapper {
  box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* 多巴胺主题样式 */
.dopamine {
  background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #DDA0DD, #98D8C8);
  background-size: 400% 400%;
  animation: dopamineGradient 15s ease infinite;
  color: #2D3436;
}

.dopamine .news-container {
  background-color: rgba(255, 255, 255, 0.85);
  color: #2D3436;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(-1deg);
}

.dopamine .news-container:hover {
  transform: rotate(0deg) scale(1.02);
  transition: transform 0.3s ease;
}

.dopamine .theme-selector select {
  background-color: rgba(255, 255, 255, 0.9);
  color: #E17055;
  border-color: #FDCB6E;
  font-weight: bold;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dopamine h1 {
  color: #E17055;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  transform: rotate(1deg);
}

.dopamine .video-container {
  transform: rotate(0.5deg);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dopamine .video-wrapper {
  box-shadow: 0 6px 16px rgba(225, 112, 85, 0.3);
  transform: rotate(-0.5deg);
}

.dopamine .news-content p {
  font-weight: 500;
  color: #2D3436;
}

.dopamine .news-content p:nth-child(odd) {
  color: #6C5CE7;
  transform: rotate(0.5deg);
}

.dopamine .news-content p:nth-child(even) {
  color: #00B894;
  transform: rotate(-0.5deg);
}

@keyframes dopamineGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .news-container {
    padding: 15px;
  }
  
  .video-container {
    margin: 15px 0;
  }
  
  .theme-selector {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 20px;
    text-align: center;
  }
}
</style>
